using System;
using System.Collections.Generic;
using UMC.Data;
namespace UMC.ITME.Entities
{
public partial class Alert
{
readonly static Action<Alert,object>[] _SetValues=new Action<Alert,object>[]{(r,t)=>r.Content=Reflection.ParseObject(t, r.Content),(r,t)=>r.Id=Reflection.ParseObject(t, r.Id),(r,t)=>r.Time=Reflection.ParseObject(t, r.Time),(r,t)=>r.Title=Reflection.ParseObject(t, r.Title),(r,t)=>r.Type=Reflection.ParseObject(t, r.Type),(r,t)=>r.Value=Reflection.ParseObject(t, r.Value)};
readonly static string[] _Columns=new string[]{"Content","Id","Time","Title","Type","Value"};
protected override void SetValue(string name, object obv){
var index = Utility.Search(_Columns,name, StringComparer.CurrentCultureIgnoreCase);
if (index > -1)_SetValues[index](this, obv);
}
protected override void GetValues(Action<String, object> action){
AppendValue(action,"Content", this.Content);
AppendValue(action,"Id", this.Id);
AppendValue(action,"Time", this.Time);
AppendValue(action,"Title", this.Title);
AppendValue(action,"Type", this.Type);
AppendValue(action,"Value", this.Value);
}

 protected override RecordColumn[] GetColumns(){
 var cols = new RecordColumn[6];
cols[0]= RecordColumn.Column("Content",this.Content);
cols[1]= RecordColumn.Column("Id",this.Id);
cols[2]= RecordColumn.Column("Time",this.Time);
cols[3]= RecordColumn.Column("Title",this.Title);
cols[4]= RecordColumn.Column("Type",this.Type);
cols[5]= RecordColumn.Column("Value",this.Value);
return cols;
}

}
}
